package com.doit.spark.day01.utils

import org.apache.log4j.{Level, Logger}
import org.apache.spark.{SparkConf, SparkContext}

/**
 * @DATE 2022/1/2/22:25
 * @Author MDK
 * @Version 2021.2.2
 * */
object SparkUtil {
  //设置日志级别
//  Logger.getLogger("org").setLevel(Level.ERROR)
  def getSc:SparkContext = {
    val conf = new SparkConf().setAppName("demo").setMaster("local[*]")
    new SparkContext(conf)
  }
}
